package com.springcloud.sc.ucpv5.client.commondata.data;

import com.springcloud.sc.ucpv5.client.commondata.datachange.DataExChange;
import com.google.protobuf.Message;

/**
 * Generated from IDL struct "SSInfoPara".
 *
 * @author JacORB IDL compiler V 2.3-beta-2, 14-Oct-2006
 * @version generated at 2014-10-29 11:48:54
 */

public final class SSInfoPara extends DataExChange {
    public SSInfoPara() {
    }

    public String name = "";
    public String value = "";

    public SSInfoPara(String name, String value) {
	this.name = name;
	this.value = value;
    }

    public Message dataChangeCommonToProBufData() {
	try {
	    com.proto.uuos_sdk_pb.SSInfoPara.Builder builder_dst = com.proto.uuos_sdk_pb.SSInfoPara.newBuilder();
	    builder_dst.setName(name);
	    builder_dst.setValue(value);
	    Message pbMessage = builder_dst.build();
	    return pbMessage;
	} catch (Exception e) {
	    // TODO: handle exception
	}

	return null;
    }

    public void dataChangeProBufDataToCommon(Message builder_src) {
	try {
	    com.proto.uuos_sdk_pb.SSInfoPara userInfo = (com.proto.uuos_sdk_pb.SSInfoPara) builder_src;

	    name = userInfo.getName();
	    value = userInfo.getValue();
	} catch (Exception e) {
	    e.printStackTrace();
	}
    }
}
